<template>
	<view>
		<view class="content">
			<view class="title" v-if="article.type == 1 && article.title">{{ article.title }}</view>
			<view class="info">
				<view class="left" @tap="person(article)">
					<headimg :realSrc="article.avatar"></headimg>
					<!-- <image :src="article.avatar ? article.avatar : defimg"></image> -->
				</view>
				<view class="center">
					<view class="name">{{ article.nicheng ? article.nicheng : '未设置昵称' }}</view>
					<view class="time">{{ article.time }}</view>
				</view>
				<view class="follow follow_cancel" v-show="article.user_id != user_id && article.follow_id" @tap="follow">已关注</view>
				<view class="follow" v-show="addType != 999 && article.user_id != user_id && !article.follow_id" @tap="follow">关注</view>
			</view>
			<view class="followTitle" v-if="article.type == 2 && article.title">{{ article.title }}</view>
			<view class="from" v-if="article.type == 2" @tap="goDetail(article.article_fid)">
				<view class="fromInfo">
					<view class="fromInfo-left">
						<!-- <image :src="article.subhead_avatar ? article.subhead_avatar : defimg"></image> -->
						<headimg :realSrc="article.subhead_avatar"></headimg>
					</view>
					<view>
						<view class="fromInfo_name">{{ article.subhead_nicheng ? article.subhead_nicheng : '未设置昵称' }}</view>
						<view class="fromInfo_time">{{ article.ftime }}</view>
					</view>
				</view>
				<view class="fromCont">
					<view class="title" :class="[article.img_url ? 'titleShort':'']">{{ article.subhead_title}}</view>
					<image v-if="article.img_url" :src="article.img_url"></image>
				</view>
				<view class="cont_info">
					<view class="tip" v-if="article.article_name">{{ article.article_name }}</view>
					<view class="num">{{ article.readnum }}阅读</view>
				</view>
			</view>
			<u-parse class="cont" v-if="article.type == 1 && article.content" :content="article.content"></u-parse>
			<view v-show="stateType == 0 && addType != 999">
				<view>
					<view class="cont_info" v-if="article.type == 1">
						<view class="tip" v-if="article.article_name">{{ article.article_name }}</view>
						<view class="num">{{ article.readnum }}阅读量</view>
					</view>
					<view class="evaluate">
						<view class="up" :class="[article.is_like == 2 ? 'upActive':'']" @tap="isLike">
							<i class="iconfont1 iconzan"></i>{{ article.likenum }}
						</view>
						<view class="down" :class="[article.is_like == 1 ?'downActive':'']" @tap="disLike">
							<i class="iconfont1 iconbuganxingqu"></i>{{ article.dislikenum }}
						</view>
						<view class="comment" @tap="checkReply(article.article_id,1)">
							<i class="iconfont1 iconpinglun"></i>{{ article.commentnum }}
						</view>
					</view>
				</view>
				<!-- 评论模块 -->
				<view class="none" v-if="commentList.length == 0">没有评论</view>
				<view class="plAll" v-for="(item, index) in commentList" :key="index">
					<view class="leftAvatar" @tap="person(item,2)">
						<!-- <image :src="item.avatar ? item.avatar : defimg"></image> -->
						<headimg :realSrc="item.avatar"></headimg>
					</view>
					<view class="plInfo">
						<view class="plInfo_detail">
							<view class="plName">{{ item.users_name ? item.users_name : '未设置昵称' }}</view>
							<view class="zan" :class="[item.is_like == 1 ? 'zan_active' : 'i']" @tap="giveUp(item.article_reply_id,item.is_like)">
								<i class="iconfont1 iconzan"></i>{{ item.likenum }}
							</view>
						</view>
						<view @tap="checkReply(item.article_reply_id,2)">
							<view class="plCont" v-html="item.reply_text"></view>
							<view v-show="item.reply_text.length > 25" class="all">查看全文</view>
						</view>
						<view class="cont_info">
							<view class="num">{{ item.time }}</view>
							<view class="reply">{{ item.answer.length }}回复</view>
							<view class="cont_delete" v-if="item.user_id == user_id" @tap="deleteItem(item.article_reply_id,index)">删除</view>
						</view>
					</view>
				</view>
				<uni-load-more v-if="commentList.length >= 6" :status="status" :content-text="contentText" />
			</view>
		</view>
		<view class="bottom" v-show="stateType == 0 && addType != 999">
			<input type="text" v-model="apply_text" placeholder="参与评论~" placeholder-class="input" @focus="inputFocus" @blur="inputBlur"
			 @input="descInput" />
			<view class="send" :class="[isFoucs ? '' : 'vague']" @tap="send">发送</view>
		</view>
		<view class="button" v-show="isShow" @tap="closeButton">
			<view class="buttonView" v-show="stateType == 0 && addType != 999">
				<!-- <view @tap.stop="collectData">{{ collect }}</view> -->
				<view @tap.stop="forward" v-if="(addType == 1 || addType == 9) && article.users_type == 3">转发</view>
				<view v-if="article.is_check == 3" @tap.stop="check">违规查看</view>
				<view v-if="article.is_check == 3" @tap.stop="editArt">修改</view>
				<view v-if="article.is_check != 3" @tap.stop="report">举报</view>
				<view class="cancle">取消</view>
			</view>
			<view class="buttonView" v-show="stateType == 1 || stateType == 2">
				<view @tap.stop="isTopClick(article.is_top)" v-if="stateType == 1">{{article.is_top == 1 ? '置顶':'取消置顶'}}</view>
				<view @tap.stop="togglePopup('bottom', 'handle')" v-if="stateType != 1 && stateType != 2">分享</view>
				<view @tap.stop="editArt">修改</view>
				<view @tap.stop="deleteArt">删除</view>
				<view class="cancle">取消</view>
			</view>
			<view class="buttonView" v-show="stateType == 3">
				<view v-if="article.is_check == 3" @tap.stop="check">违规查看</view>
				<view v-if="article.is_check == 3" @tap.stop="editArt">修改</view>
				<view @tap.stop="deleteArt">删除</view>
				<view class="cancle">取消</view>
			</view>
		</view>
		<view class="button" v-if="isDelete" @tap="closeButton">
			<view class="deleteView">
				<view class="deleteTitle">删除之后无法恢复，您确定要删除文章？</view>
				<view class="buttons"><text class="btn_cancle" @tap="closeButton">取消</text><text class="btn_yes" @tap="btnYes">确定</text></view>
			</view>
		</view>
		<uni-popup ref="handle" type="share" :custom="true">
			<view class="uni-share">
				<view class="uni-bottom">
					<view class="uni-share-title">
						<view class="title_text">分享到</view>
						<view class="uni-share-btn" @click="cancel('handle')"><i class="iconfont iconguanbi"></i></view>
					</view>
					<view class="uni-share-content">
						<view v-for="(item, index) in handle" :key="index" class="uni-share-content-box" @tap="report(index,2)">
							<view class="uni-share-content-image">
								<i class="iconfont" :class="item.icon"></i>
							</view>
							<view class="uni-share-content-text">{{item.text}}</view>
						</view>
					</view>
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	import headimg from '@/components/head_img.vue'
	import util from '@/common/util.js';
	import uParse from '@/components/u-parse/u-parse.vue';
	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
	import uniPopup from '@/components/uni-popup/uni-popup.vue';
	export default {
		components: {
			uParse,
			uniLoadMore,
			uniPopup,
			headimg
		},
		data() {
			return {
				stateType: '', // 0为默认抖教文章
				addType: '', //附加条件: 0+0为首页抖教推荐  0+1为智囊团  1+3为家文化&孩子-目标、成长、才艺  2+2为育儿经&育儿经-我的  3+4为我的智囊团
				article: {}, //文章详情
				article_id: '', //文章ID
				article_fid: '', //父文章ID
				collect: '', //收藏状态
				page: 1,
				reload: true,
				status: 'more',
				contentText: {
					contentdown: '上拉加载更多',
					contentrefresh: '加载中',
					contentnomore: '没有更多',
					contentnot: "没数据"
				},
				commentList: [], //评论列表
				black_state: 1, //拉黑状态 0为正常，1为拉黑
				user_id: uni.getStorageSync('userInfo').id,
				apply_text: '', //评论内容
				isShow: false, //操作是否显示
				isFoucs: false, //评论是否获取焦点
				isDelete: false, //删除弹框是否显示
				handle: [{ //分享区域
						text: '微信',
						icon: 'iconweixin',
						name: 'weixin'
					},
					{
						text: '朋友圈',
						icon: 'iconpengyouquan',
						name: 'pyq'
					},
					{
						text: 'QQ',
						icon: 'iconqq',
						name: 'qq'
					},
					{
						text: '微博',
						icon: 'iconweibo',
						name: 'weibo'
					},
					{
						text: '好友',
						icon: 'iconchengyuan',
						name: 'hy'
					}
				],
				releaseType: 1, //是否为发布
				users_type: 0, // 1抖学，2抖教，3晒娃
				defimg: this.defimg,
				admin_user_id: '', //机构ID
			}
		},
		onPullDownRefresh() {
			if (this.stateType == 0) {
				this.reload = true;
				this.page = 1;
				this.getComment()();
				setTimeout(function() {
					uni.stopPullDownRefresh();
				}, 1000);
			}
		},
		onReachBottom() {
			if (this.stateType == 0) {
				this.status = 'loading';
				this.page = this.page + 1;
				var _this = this;
				setTimeout(function() {
					_this.getComment();
				}, 500);
			}
		},
		onNavigationBarButtonTap() {
			if (this.stateType == 0 || this.stateType == 1 || (this.stateType == 2 && this.user_id == this.article.user_id) ||
				this.stateType == 3) {
				// 狼爸虎妈 is_show == 1 该文章已经被审核无法修改跟删除
				if (this.stateType == 2 && this.article.is_show == 1) {
					uni.navigateTo({
						url: '/pages/articleModule/article-release?stateType=' + this.stateType + '&addType=' + this.addType
					})
				} else {
					this.isShow = !this.isShow;
				}
			} else if (this.stateType == 2) {
				uni.navigateTo({
					url: '/pages/articleModule/article-release?stateType=' + this.stateType + '&addType=' + this.addType
				})
			}
		},
		onLoad(e) {
			this.stateType = e.stateType;
			this.addType = e.addType;
			this.article_id = e.article_id;
			this.users_type = e.users_type
			if (e.releaseType) {
				this.releaseType = e.releaseType;
			}
			if (e.admin_user_id) {
				this.admin_user_id = e.admin_user_id;
			}
			// #ifdef APP-PLUS
			var webView = this.$mp.page.$getAppWebview();
			// #endif
			if (this.stateType == 0 && this.addType != 999) {
				this.addReadnum();
			} else if (this.stateType == 0 && this.addType == 999) {
				webView.setTitleNViewButtonStyle(0, {
					text: '',
					width: 0
				});
			}
		},
		onShow() {
			if (this.stateType == 0 && this.addType != 999) {
				this.page = 1;
				this.reload = true;
				this.getComment();
			}
			this.getDetail();
		},
		methods: {
			// 转发文章详情
			goDetail(id) {
				let url = ''
				if (this.users_type) {
					url = '/pages/articleModule/article-detail?stateType=' + this.stateType + '&addType=' + this.addType +
						'&article_id=' + id + '&users_type=' + this.users_type
				} else {
					url = '/pages/articleModule/article-detail?stateType=' + this.stateType + '&addType=' + this.addType +
						'&article_id=' + id
				}
				uni.navigateTo({
					url: url
				})
			},
			/* 获取文章详情 */
			getDetail() {
				var data = {}
				var url = '';
				if (this.stateType == 0) {
					if (this.addType == 1) {
						url = 'user/wisdom.Lists/articleList';
					} else if (this.addType == 999) {
						url = 'user/shakeschool.Lists/informationList';
					} else {
						url = 'user/article.Lists/articleList';
					}
					if (this.addType == 999) {
						data = {}
						data.information_id = this.article_id
						data.admin_user_id = this.admin_user_id
					} else {
						data.article_id = this.article_id
						if (this.users_type && this.users_type != '') {
							data.users_type = this.users_type
						}
						if (this.releaseType != 1) {
							data.is_user = 1
							data.is_check = this.releaseType
						}
					}
				} else if (this.stateType == 1) {
					url = 'user/newarticle.Lists/articleList';
					data.patriarch_article_id = this.article_id
				} else if (this.stateType == 2) {
					url = 'user/information.Lists/InformationList';
					data.im_id = this.article_id
					if (this.releaseType != 1) {
						data.is_show = this.releaseType
					}
				} else if (this.stateType == 3) {
					url = 'user/wisdom.Lists/articleList';
					data.article_id = this.article_id
				}
				this.$zapi.apiPost(url, data).then(res => {
					if (res.data.code == 200) {
						this.article = res.data.data.data[0];
						if (this.stateType == 0) {
							if (this.article.type == 2) {
								this.article_fid = this.article.article_fid;
							}
							if (this.article.subhead_creat_time) {
								this.article.ftime = util.getBriefTime(this.article.subhead_creat_time);
							}
							if (this.article.is_like == 2) {
								this.collect = '取消收藏';
							} else {
								this.collect = '收藏';
							}
							if (this.addType != 999) {
								this.getBlack();
							} else {
								this.article['type'] = 1;
								this.article['nicheng'] = this.article.nickname;
							}
						} else if (this.stateType == 1) {
							this.article['type'] = 1;
						} else if (this.stateType == 2) {
							this.article['type'] = 1;
							this.article['title'] = this.article.im_title;
							this.article['content'] = this.article.im_content;
							if(this.article.user_id != this.user_id) {
								// #ifdef APP-PLUS
								var webView = this.$mp.page.$getAppWebview();
								// #endif
								webView.setTitleNViewButtonStyle(0, {
									text: '发布',
									fontSize: '14px'
								});
							}
							this.getBlack();
							if (this.user_id != this.article.user_id) {
								this.getPerson(this.article.user_id);
							}
						}
						this.article.time = util.getBriefTime(this.article.creat_time);
						this.article.title = this.article.title.replace(/&lt;/g, '<').replace(/&gt;/g, '>');
						this.article.content = this.article.content.replace(/&lt;/g, '<').replace(/&gt;/g, '>');
						// this.article.content = this.article.content.replace(/&lt;videoSrc=/g, '<video src="').replace(/video&gt;/g,
						// 	'"autoplay="true" loop="true" show-center-play-btn="true" show-play-btn="false"></video>');
						this.article.content = this.article.content.replace(/><video>/g,
							'"autoplay="true" loop="true" show-center-play-btn="true" show-play-btn="false"></video>').replace(/src=/g,
							'style="max-width:100%;" src=');
						this.$forceUpdate();
					} else {
						this.article = {}
						uni.showToast({
							title: '该文章暂不支持查看',
							icon: 'none',
							success() {
								setTimeout(function() {
									uni.navigateBack({
										delta: 1
									})
								}, 500)
							}
						})
					}
				})
			},
			/* 增加阅读量 */
			addReadnum() {
				var url = ''
				if (this.addType == 1) {
					url = 'user/wisdom.Users/addbrowse';
				} else {
					url = 'user/article.Users/addbrowse';
				}
				this.$zapi.apiPost(url, {
					article_id: this.article_id
				}).then(res => {
					return;
				})
			},
			/* 判断是否拉黑此人 */
			getBlack() {
				this.$zapi.apiPost('user/video.User/UserBlackState', {
					form_id: this.article.user_id
				}).then(res => {
					this.black_state = res.data.data.black_state;
					if (this.black_state != 0) {
						uni.showModal({
							title: '提示',
							content: '对方处于您的黑名单中，无法查看对方任何信息',
							showCancel: false,
							confirmColor: '#FF9900',
							success: function(res) {
								if (res.confirm) {
									uni.navigateBack({
										delta: 2
									});
								}
							}
						});
					}
				})
			},
			/* 获取个人信息 */
			getPerson(user_id) {
				this.$zapi.apiPost('user/video.User/UserHomeByFrom', {
					form_id: user_id
				}).then(res => {
					if (res.data.code == 200) {
						var personInfo = res.data.data;
						if (personInfo.follow_state == 1) {
							this.article.follow_id = '001';
							this.$forceUpdate();
						}
					}
				});
			},
			/* 获取评论列表 */
			getComment() {
				var data = {
					page: this.page,
					pagesize: 8,
					article_id: this.article_id
				}
				var url = '';
				if (this.addType == 1) {
					url = 'user/wisdom.Users/listsReply';
				} else {
					url = 'user/article.Users/listsReply';
				}
				this.$zapi.apiPost(url, data).then(res => {
					if (res.data.code == 200) {
						var list = res.data.data.data;
						for (var i = 0; i < list.length; i++) {
							list[i].time = util.getBriefTime(list[i].crate_time);
						}
						this.commentList = this.reload ? list : this.commentList.concat(list);
						this.reload = false;
						this.status = 'more';
					} else {
						if (this.reload) {
							this.commentList = [];
						} else {
							this.status = 'noMore';
						}
					}
				})
			},
			/* 关注文章作者 */
			follow() {
				var url = '';
				if (this.article.follow_id) {
					url = 'user/video.User/UserFollowDel';
				} else {
					url = 'user/video.User/UserFollowAdd';
				}
				this.$zapi.apiPost(url, {
					form_id: this.article.user_id
				}).then(res => {
					if (this.black_state == 0) {
						uni.showToast({
							title: res.data.msg,
							icon: 'none'
						})
						if (res.data.code == 200) {
							if (this.article.follow_id) {
								this.article.follow_id = null;
							} else {
								this.article.follow_id = '001';
							}
							this.$forceUpdate();
						}
					} else {
						uni.showToast({
							title: '请先将对方移出黑名单',
							icon: 'none'
						})
					}
				})
			},
			/* 获取焦点 */
			inputFocus() {
				this.isFoucs = true;
			},
			/* 失去焦点 */
			inputBlur() {
				this.isFoucs = false;
			},
			/* 获取文本域的长度及内容 */
			descInput(e) {
				this.apply_text = e.detail.value;
			},
			/* 文章喜欢 */
			isLike() {
				if (this.article.is_like == 2) {
					this.changeIslike(0);
				} else {
					this.changeIslike(2);
				}
			},
			/* 文章不喜欢 */
			disLike() {
				if (this.article.is_like == 1) {
					this.changeIslike(0);
				} else {
					this.changeIslike(1);
				}
			},
			/* 文章收藏&取消收藏操作 */
			collectData() {
				if (this.article.is_like == 2) {
					this.changeIslike(0);
				} else {
					this.changeIslike(2);
				}
				this.isShow = false;
			},
			/* 收藏&取消收藏 */
			changeIslike(state) {
				var data = {
					article_id: this.article_id,
					is_like: state
				}
				var url = '';
				if (this.addType == 1) {
					url = 'user/wisdom.Users/isLike';
				} else {
					url = 'user/article.Users/isLike';
				}
				this.$zapi.apiPost(url, data).then(res => {
					uni.showToast({
						title: res.data.msg,
						icon: 'none'
					})
					this.getDetail();
				})
			},
			/* 评论文章 */
			send() {
				var data = {
					article_id: this.article_id,
					text: this.apply_text,
					pid: 0,
					answer_id: 0
				}
				if(!this.apply_text) {
					uni.showToast({
						title: '请输入评论内容',
						icon: 'none'
					})
					return
				}
				var url = '';
				if (this.addType == 1) {
					url = 'user/wisdom.Users/addReply';
				} else {
					url = 'user/article.Users/addReply';
				}
				this.$zapi.apiPost(url, data).then(res => {
					uni.showToast({
						title: res.data.msg,
						icon: 'none'
					})
					if (res.data.code == 200) {
						this.page = 1,
							this.reload = true;
						this.getComment();
						this.apply_text = '';
						this.article.commentnum++;
					}
				})
			},
			/* 评论点赞 & 取消点赞 */
			giveUp(article_reply_id, is_like) {
				var data = {
					article_id: this.article_id,
					article_reply_id: article_reply_id
				}
				var url = '';
				if (this.addType == 1) {
					if (is_like == 1) {
						url = 'user/wisdom.Users/delReplyLike';
					} else {
						url = 'user/wisdom.Users/addReplyLike';
					}
				} else {
					if (is_like == 1) {
						url = 'user/article.Users/delReplyLike';
					} else {
						url = 'user/article.Users/addReplyLike';
					}
				}
				this.$zapi.apiPost(url, data).then(res => {
					if (res.data.code == 200) {
						for (var i = 0; i < this.commentList.length; i++) {
							if (article_reply_id == this.commentList[i].article_reply_id) {
								if (is_like == 1) {
									this.commentList[i].is_like = null;
									this.commentList[i].likenum--;
								} else {
									this.commentList[i].is_like = 1;
									this.commentList[i].likenum++;
								}
							}
						}
					}
				})
			},
			/* 删除自己的评论 */
			deleteItem(article_reply_id, index) {
				var _this = this;
				uni.showModal({
					title: '删除提示',
					content: '确定要删除这条评论吗？',
					confirmColor: '#FF9900',
					success: function(res) {
						if (res.confirm) {
							var data = {
								article_reply_id: article_reply_id,
								article_id: _this.article.article_id
							}
							var url = '';
							if (_this.addType == 1) {
								url = 'user/wisdom.Users/delReply';
							} else {
								url = 'user/article.Users/delReply';
							}
							_this.$zapi.apiPost(url, data).then(res => {
								if (res.data.code == 200) {
									_this.commentList.splice(index, 1);
									_this.getDetail();
								}
							})
						}
					}
				})
			},
			/* 转发文章 */
			forward() {
				if (this.article_fid) {
					uni.redirectTo({
						url: '/pages/articleModule/article-forward?stateType=' + this.stateType + '&addType=' + this.addType +
							'&article_id=' + this.article_fid + '&users_type=' + this.article.users_type
					})
				} else {
					uni.redirectTo({
						url: '/pages/articleModule/article-forward?stateType=' + this.stateType + '&addType=' + this.addType +
							'&article_id=' + this.article_id + '&users_type=' + this.article.users_type
					})
				}
			},
			/* 举报文章 */
			report() {
				if (this.article_fid) {
					uni.navigateTo({
						url: '../complain/reported?stateType=' + this.stateType + '&addType=' + this.addType + '&article_id=' + this.article_fid
					})
				} else {
					uni.navigateTo({
						url: '../complain/reported?stateType=' + this.stateType + '&addType=' + this.addType + '&article_id=' + this.article_id
					})
				}
			},
			/* 查看个人评论 */
			checkReply(article_reply_id, type) {
				if (type == 1) {
					uni.navigateTo({
						url: '/pages/articleModule/article-replyAll?stateType=' + this.stateType + '&addType=' + this.addType +
							'&article_id=' + this.article_id
					})
				} else if (type == 2) {
					uni.navigateTo({
						url: '/pages/articleModule/article-replyPerson?stateType=' + this.stateType + '&addType=' + this.addType +
							'&article_id=' + this.article_id + '&article_reply_id=' + article_reply_id
					})
				}
			},
			/* 跳转个人主页 */
			person(article,type) {
				if(type == 2) {
					article['article_type_id'] = 0;
				}
				// 育娃
				let url = '/pages/school/my-center?user_id=' + article.user_id + '&article_type_id=' + article.article_type_id
				if (this.users_type && this.users_type > 0) {
					// 抖校
					url = '/pages/school/my-center?user_id=' + article.user_id + '&users_type=' + this.users_type
				}
				uni.navigateTo({
					url: url
				})
				// if(this.addType == 1 || this.addType == 4) {
				// 	if (this.user_id == this.article.user_id) {
				// 		uni.navigateTo({
				// 			url: '/pages/school/my-center'
				// 		})
				// 	} else {
				// 		uni.navigateTo({
				// 			url: '/pages/school/my-center?user_id=' + this.article.user_id
				// 		})
				// 	}
				// }
			},
			/* 关闭操作弹窗 */
			closeButton() {
				this.isShow = false;
				this.isDelete = false;
			},
			/* 打开底部分享弹窗 */
			togglePopup(type, open) {
				this.isShow = false;
				this.$refs[open].open();
			},
			/* 关闭底部分享弹窗 */
			cancel(type) {
				this.$refs[type].close()
			},
			/* 文章置顶 & 取消置顶 */
			isTopClick(topType) {
				this.isShow = false;
				var is_top = 1;
				if (topType == 1) {
					is_top = 2;
				} else if (topType == 2) {
					is_top = 1;
				}
				var data = {
					patriarch_article_id: this.article_id,
					is_top: is_top
				}
				this.$zapi.apiPost('user/newarticle.Lists/setTop', data).then(res => {
					uni.showToast({
						title: res.data.msg,
						icon: 'none'
					})
					if (res.data.code == 200) {
						this.article.is_top = is_top;
					}
					this.$forceUpdate();
				})
			},
			/* 打开删除文章蒙版 */
			deleteArt() {
				this.isShow = false;
				this.isDelete = !this.isDelete;
			},
			/* 确认删除 */
			btnYes() {
				this.isShow = false;
				this.isDelete = false;
				var data = {}
				var url = '';
				if (this.stateType == 0) {
					if (_this.addType == 1) {
						url = 'user/wisdom.Users/delArticle';
					} else {
						url = 'user/article.Users/delArticle';
					}
					data.article_id = this.article_id
				} else if (this.stateType == 1) {
					url = 'user/newarticle.Lists/delArticle'
					data.patriarch_article_id = this.article_id
				} else if (this.stateType == 2) {
					url = 'user/information.Lists/delInformation'
					data.im_id = this.article_id
				} else if (this.stateType == 3) {
					url = 'user/wisdom.Users/delArticle'
					data.article_id = this.article_id
				}
				this.$zapi.apiPost(url, data).then(res => {
					uni.showToast({
						title: res.data.msg,
						icon: 'none'
					})
					if (res.data.code == 200) {
						setTimeout(function() {
							uni.navigateBack({
								delta: 2
							})
						}, 1000);
					}
				})
			},
			/* 修改文章 */
			editArt() {
				this.isShow = false;
				if (this.stateType == 1) {
					uni.navigateTo({
						url: 'article-edit?stateType=' + this.stateType + '&addType=' + this.addType + '&article_id=' + this.article_id +
							'&article_type=' + this.article.article_type
					})
				} else {
					// 晒娃文章
					if (this.users_type == 3) {
						uni.navigateTo({
							url: '../school/article-edit?stateType=' + this.stateType + '&addType=' + this.addType + '&article_id=' + this
								.article_id + '&article_type=' + this.article.article_type + '&users_type=' + this.users_type
						})
					} else {
						uni.navigateTo({
							url: 'article-edit?stateType=' + this.stateType + '&addType=' + this.addType + '&article_id=' + this.article_id +
								'&releaseType=' + this.releaseType
						})
					}
				}
			},
			check() {
				this.isShow = false;
				uni.navigateTo({
					url: '../complain/be-reported?stateType=' + this.stateType + '&addType=' + this.addType + '&article_id=' + this.article_id +
						'&type=1'
				})
			}
		}
	}
</script>

<style>
	page {
		background: #FFFFFF;
	}

	.content {
		padding: 30upx 30upx 100upx;
	}

	.title {
		color: #333333;
		font-size: 38upx;
		line-height: 1.2;
		margin-bottom: 30upx;
	}

	.info {
		padding-bottom: 30upx;
		display: flex;
		justify-content: flex-start;
		align-items: center;
	}

	.left {
		width: 72upx;
		height: 72upx;
		margin-right: 20upx;
	}

	.left image {
		width: 72upx;
		height: 72upx;
		border-radius: 50%;
	}

	.center view {
		line-height: 1.4;
	}

	.name {
		color: #333333;
		font-size: 30upx;
	}

	.time {
		color: #999999;
		font-size: 26upx;
	}

	.follow {
		color: #ffffff;
		font-size: 26upx;
		background: #FF9900;
		line-height: 1;
		padding: 14upx 36upx;
		border-radius: 26upx;
		position: absolute;
		right: 30upx;
		margin-top: 12upx;
	}

	.follow_cancel {
		color: #ffffff;
		background: #E5E5E5;
	}

	.followTitle {
		color: #333333;
		font-size: 32upx;
		margin-bottom: 10upx;
	}

	.from {
		width: 100%;
		height: 300upx;
		border: 1px solid rgba(229, 229, 229, 1);
	}

	.fromInfo {
		display: flex;
		justify-content: flex-start;
		align-items: center;
		padding: 20upx 0 0 20upx;
	}
	
	.fromInfo-left {
		width: 72upx;
		height: 72upx;
		margin-right: 20upx;
	}
	
	.fromInfo-left image {
		width: 72upx;
		height: 72upx;
		border-radius: 50%;
	}

	.fromInfo_name {
		color: #333333;
		font-size: 30upx;
		line-height: 1.2;
	}

	.fromInfo_time {
		color: #999999;
		font-size: 22upx;
		line-height: 1.2;
	}

	.from .title {
		width: 100%;
		color: #333333;
		font-size: 32upx;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}

	.titleShort {
		width: calc(100% - 150upx) !important;
	}
	
	.fromCont {
		display: flex;
		justify-content: space-between;
		margin: 10upx 20upx;
		position: relative;
		bottom: 0;
		min-height: 120upx;
	}

	.fromCont .title {
		line-height: 1.8;
		margin-bottom: 0;
	}

	.fromCont image {
		width: 120upx;
		height: 120upx;
	}

	.cont {
		color: #333333;
		font-size: 32upx;
		word-wrap: break-word;
	}

	.cont image {
		clear: both !important;
		display: block !important;
		margin: auto !important;
	}

	/* 标签及阅读量 */
	.cont_info {
		display: flex;
		justify-content: flex-start;
		align-items: center;
		margin: 20upx 0;
	}

	.from .cont_info {
		margin: 10upx 0 0 20upx;
	}

	.tip {
		color: #FF9900;
		padding: 8upx 16upx;
		border: 2upx solid #FF9900;
		border-radius: 24upx;
		line-height: 1;
		margin-right: 14upx;
		font-size: 24upx;
	}

	.num {
		color: #999999;
		font-size: 22upx;
	}

	/* 阅读者情况 */
	.evaluate {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin: 40upx 0;
	}

	.up,
	.down,
	.comment {
		padding: 0 52upx;
		line-height: 1;
		border: 1upx solid #cccccc;
		border-radius: 36upx;
		color: #999999;
		font-size: 26upx;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.up i,
	.down i,
	.comment i {
		line-height: 1;
		margin-right: 10upx;
		font-size: 60upx;
	}

	.upActive,
	.upActive view,
	.downActive,
	.downActive view {
		color: #ff4e78;
		border-color: #ff4e78;
	}

	/* 评论 */
	.none {
		color: #999999;
		text-align: center;
		margin-top: 200upx;
	}

	.plAll {
		display: flex;
		justify-content: flex-start;
		margin-bottom: 30upx;
	}

	.leftAvatar,
	.leftAvatar image {
		width: 72upx;
		height: 72upx;
		margin-right: 10upx;
		border-radius: 50%;
	}

	.plInfo {
		width: 90%;
		position: relative;
	}

	.plInfo_detail {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.plInfo_detail view {
		line-height: 1;
	}

	.plName {
		color: #333333;
		font-size: 30upx;
	}

	.zan {
		color: #999999;
		font-size: 16upx;
		display: flex;
		align-items: center;
	}

	.zan i {
		color: #999999;
		font-size: 50upx;
	}

	.zan_active {
		color: #FF4E78;
	}

	.zan_active i {
		color: #FF4E78;
	}

	.plCont {
		width: 99%;
		color: #333333;
		font-size: 26upx;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 5;
		-webkit-box-orient: vertical;
		margin-top: 20upx;
		overflow: hidden;
		word-break: break-all;
		word-wrap: break-word;
	}

	.all {

		position: absolute;
		right: 10upx;
		background-color: #FFFFFF;
		z-index: 1;
		bottom: 84upx;
		height: 46upx;
		line-height: 32upx;
		color: #FF9900;
	}

	.all:before {
		content: '...';
		right: 0;
		width: 140upx;
		height: 40upx;
		background: #FFFFFF;
	}

	.reply {
		background: #f2f2f2;
		padding: 12upx 18upx;
		color: #999999;
		border-radius: 22upx;
		line-height: 1;
		margin-left: 20upx;
	}

	.cont_delete {
		color: #F25252;
		margin-left: 20upx;
	}

	/* 底部弹窗 */
	.button {
		z-index: 999;
		position: fixed;
		top: 0;
		left: 0;
		height: 100%;
		width: 100%;
		background: rgba(0, 0, 0, 0.4);
	}

	.buttonView {
		position: fixed;
		bottom: 0;
		width: 100%;
		background-color: #f6f6f6;
		border-radius: 42upx 42upx 0 0;
	}

	.buttonView view {
		height: 90upx;
		line-height: 90upx;
		text-align: center;
		font-size: 30upx;
		color: #333333;
		background: #FFFFFF;
		border-top: 2upx solid #F6F6F6;
	}

	.buttonView view:first-child {
		border-radius: 40upx 40upx 0 0;
		border: none;
	}

	.cancle {
		border: none;
		margin-top: 30upx;
	}

	.deleteView {
		position: fixed;
		width: 422upx;
		height: 234upx;
		top: calc(50% - 117upx);
		left: calc(50% - 211upx);
		background-color: #ffffff;
		border-radius: 20upx;
	}

	.deleteTitle {
		color: #333333;
		font-size: 36upx;
		padding: 30upx;
		line-height: 1.4;
	}

	.buttons {
		display: flex;
		justify-content: space-between;
		padding: 0 30upx;
	}

	.btn_cancle {
		color: #999999;
		font-size: 36upx;
	}

	.btn_yes {
		color: #FF9900;
		font-size: 36upx;
	}

	.bottom {
		z-index: 999;
		position: fixed;
		bottom: 0;
		left: 0;
		width: 690upx;
		padding: 0 30upx;
		height: 80upx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		background: #fafafa;
		box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.16);
	}

	.bottom input {
		width: 80%;
		background: #ffffff;
		border-radius: 8upx;
		padding-left: 20upx;
		height: 66upx;
		line-height: 66upx;
	}

	.bottom .input {
		color: #cccccc;
		font-size: 30upx;
	}

	.send {
		color: #ffffff;
		font-size: 34upx;
		background: #FF9900;
		border-radius: 8upx;
		padding: 16upx 20upx;
		line-height: 1;
	}

	.vague {
		opacity: 0.3;
	}

	/* 底部分享 */
	.uni-share {
		position: fixed;
		top: 0;
		left: 0;
		height: 100%;
		width: 100%;
		background: rgba(0, 0, 0, 0.4);
	}

	.uni-bottom {
		width: 100%;
		position: absolute;
		bottom: 0;
	}

	.uni-share-title {
		/* position: absolute;
		bottom: 242upx; */
		/* width: 690upx; */
		width: 100%;
		height: 88upx;
		line-height: 60upx;
		font-size: 32upx;
		/* padding: 30upx 30upx; */
		display: flex;
		justify-content: space-between;
		align-items: center;
		border-radius: 40upx 40upx 0 0;
		background: #FFFFFF;
	}

	.uni-share-content {
		/* position: absolute;
		bottom: 0; */
		/* width: 650upx; */
		width: 100%;
		height: 252upx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		flex-wrap: wrap;
		/* padding: 60upx 50upx 30upx; */
		background: #FFFFFF;
		border-top: 1upx solid rgba(229, 229, 229, 1);
	}

	.uni-share-content-box {
		width: 20%;
		justify-content: center;
		display: flex;
		flex-direction: column;
		align-items: center;
		box-sizing: border-box;
	}

	.uni-share-content-image {
		display: flex;
		justify-content: center;
		align-items: center;
		overflow: hidden;
		border-radius: 10upx;
	}

	.uni-share-content-image i {
		font-size: 50upx;
		width: 76upx;
		height: 76upx;
		color: #FFFFFF;
		text-align: center;
		line-height: 76upx;
		border-radius: 50%;
	}

	.iconweixin,
	.iconpengyouquan {
		background: #3CB035;
	}

	.iconqq {
		background: #55ADEC;
	}

	.iconweibo {
		background: #F25252;
	}

	.iconchengyuan {
		background: #00D5A2;
	}

	.uni-share-content-text {
		font-size: 26upx;
		color: #333;
		padding-top: 5px;
		padding-bottom: 10px;
	}

	.title_text {
		margin-left: 30upx;
	}

	.uni-share-btn {
		text-align: center;
		color: #666;
		margin-right: 30upx;
	}

	.head_image {
		width: 72upx;
		height: 72upx;
		margin-right: 20upx;
	}
</style>
